package com.longlong.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.longlong.config.typehandler.ArrayStringTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.JdbcType;

import java.time.LocalDateTime;


@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("registration_racetrack")
public class RegistrationRacetrack {

    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 赛道名称
     */
    private String raceTrackName;

    /**registrationDeleteById
     * 赛道描述 字符串处理为数组返回
     */
    @TableField(typeHandler = ArrayStringTypeHandler.class, jdbcType= JdbcType.VARCHAR)
    private String[] raceTrackDescribe;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(fill = FieldFill.DEFAULT)
    private LocalDateTime deleteTime;

    @TableLogic  //逻辑删除
    private Integer deleted;

}
